package com.hutao.manage.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.hutao.manage.pojo.TreatmentTrace;
import com.hutao.manage.query.MedTraceQuery;

public interface TreatmentTraceMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(TreatmentTrace record);

    int insertSelective(TreatmentTrace record);

    TreatmentTrace selectByPrimaryKey(Integer id);

    
    int updateByPrimaryKeySelective(TreatmentTrace record);

    List<Map<String,Object>> selectTraceByMedTraceQuery(MedTraceQuery medTraceQuery);
    
    int selectTraceByMedTraceQueryCount(MedTraceQuery medTraceQuery);
    
	/**
	 * @yimr
	 * 根据traceType查询未上架的或已上架的病案示踪记录
	 * @param medTraceQuery
	 * @return
	 */
	List<Map<String,Object>> selectMedShelveByTraceType(MedTraceQuery medTraceQuery);
	
	
	/**
	 * @yimr
	 * 根据traceType查询未上架的或已上架的病案示踪记录总数
	 * @param medTraceQuery
	 * @return
	 */
	int selectMedShelveByTraceTypeCount(MedTraceQuery medTraceQuery);
	
	List<Map<String,Object>> getTreatmentTraceTypeByCode(String code);
	
	List<Map<String,Object>> getTreatmentTraceByCodeAndGuid(@Param("code")Integer code,@Param("guid")String guid);
	
	//归档工作量统计
	List<Map<String, Object>> getWorkloadStatisticsDateOfFiling(Map<String, Object> params);
	
	//质控工作量统计
	List<Map<String, Object>> getWorkloadStatisticsQualityControl(Map<String, Object> params);
	
	//编页工作量统计
	List<Map<String, Object>> getWorkloadStatisticsPagenation(Map<String, Object> params);
	
	//编目工作量统计
	List<Map<String, Object>> getWorkloadStatisticsCatalog(Map<String, Object> params);
	
	
	int isPagenationTreatementTrace(@Param("firstGuid")String firstGuid,@Param("traceTypeId")Integer traceTypeId);
	
	int deleteByFirstGuid(@Param("firstGuid")String firstGuid);
	
	
	String selectOperatorByGuidAndTreateCode(@Param("firstGuid")String firstGuid,@Param("traceCode")String traceCode);
	
	List<Integer> selectTraceByGuidAndCode(@Param("firstGuid")String firstGuid,@Param("traceCode")String traceCode); 
	
	
	
	
}




